	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		${name} other = (${name}) obj;
			
	<#list equalsAttributes as attribute>
		<#if !attribute.identifier >
			<#if attribute.scalarType>
		if (${attribute.getterName}() != other.${attribute.getterName}()) {
			return false;
		}
			<#else>
		if (${attribute.getterName}() == null) {
			if (other.${attribute.getterName}() != null) {
				return false;
			}
		} else if (!${attribute.getterName}().equals(other.${attribute.getterName}())) {
			return false;
		}
			</#if>
		</#if>
	</#list>
		return true;			
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
	<#list hashCodeAttributes as attribute>
		<#if attribute.scalarType>
			<#if attribute.numericType>
				<#if attribute.type == 'long'>
		result = prime * result + (int) (${attribute.name} ^ (${attribute.name} >>> 32));
				<#else>			
		result = prime * result + ${attribute.getterName}();
				</#if>
			<#else>
				<#if attribute.type == 'boolean'>
		result = prime * result + (${attribute.name}?1:0);
				</#if>
			</#if>
		<#else>
		result = prime * result + ((${attribute.getterName}() == null) ? 0 : ${attribute.getterName}().hashCode());
		</#if>
	</#list>
		return result;
	}
	
	@Override
	public String toString() {
		return "${name} [" 
	<#list allAttributes as attribute>
			+ "${attribute.name}=" + ${attribute.getterName}() 
	</#list>
			+ "]";
	}